<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="header.jsp"></jsp:include>
<div class="container">
	<div class="row">
		<div class="span4">
			<form action="ShowTimetableServlet" method="post">
				<fieldset>
					<legend>请输入要查询时日期</legend>
					<div class="control-group" style="text-align: left">
						<div class="controls">
							<input type="text" class="input-medium" id="createDate"
								name="createDate" onclick="calendar.show(this);" />
						</div>
					</div>
					<div>
						<button type="submit" class="btn btn-primary">查询</button>
						<a href="./index.jsp" class="btn">返回</a>
					</div>
				</fieldset>
			</form>
		</div>
		<div class="span8">
			<fieldset>
				<legend>放映时刻票</legend>
				<table class="table table-striped table-bordered table-condensed">
					<thead>
						<tr>
							<th>电影名</th>
							<th>放映厅号</th>
							<th>放映厅类型</th>
							<th>开始时间</th>
							<th>时长(分钟)</th>
							<th>票价(元)</th>
							<th>操作</th>
						</tr>
					</thead>
					<c:forEach items="${ timetableList }" var="timetable">
						<tbody>
							<tr>
								<td>${ timetable.movie.mName }</td>
								<td>${ timetable.hall.id }</td>
								<td>${ timetable.hall.type }</td>
								<td>${ timetable.startTime }</td>
								<td>${ timetable.movie.mLength }</td>
								<td>${ timetable.movie.mPrice }</td>
								<td><a
									href="BuyTicketServlet?action=buy&timetable=${ timetable.id}">购买</a></td>
							</tr>
						</tbody>
					</c:forEach>
				</table>
			</fieldset>
		</div>
	</div>
</div>
<jsp:include page="footer.jsp"></jsp:include>